<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/7/18
  Time: 14:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<jsp:useBean id="user" class="com.nothing.Model.User" scope="request" ></jsp:useBean>
<%
    String basePath = request.getContextPath();
// 将contextPath保存到request中
    request.setAttribute("basePath", basePath);
%>
<html>
<head>
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"></script>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="../../js/register.js"></script>


    <title>Title</title>
</head>
<body>
    <div class="container">
        <div>
        </div>
        <div class="row">
            <div class="col-md-4"></div>
            <div class="col-md-4">
                <h2 style="text-align: center">注册新用户</h2>
                <div method="get" class="form-horizontal" role="form"  modelAttribute="user">
                    <div class="form-group">
                        <label class="col-md-3 control-label">用户名</label>
                        <div class="col-md-9">
                            <input type="text" id="name" class="form-control" placeholder="用户名" name="username" value="${user.username}"></input>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">密码</label>
                        <div class="col-md-9">
                            <input type="text" id="psw" class="form-control" placeholder="密码"  name="password" value="${user.password}"></input>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">职业</label>
                        <div class="col-md-9">
                            <input type="text" class="form-control" placeholder="职业">
                        </div>
                    </div>
                    <div>
                        <button class="form-control" value="提交" onclick="toSubmit()" >注册 </button>
                        <form action="/one" method="GET" >
                            <input type="submit" id="toone">
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-md-4"></div>
        </div>
    </div>
</body>
</html>
